package cn.jilian.sys.service.support;


import java.util.Comparator;

import cn.jilian.entity.Menu;



public class MenuSortable implements Comparator<Menu> {

	@Override
	public int compare(Menu arg0, Menu arg1) {
		if(arg0==null) {
			if(arg1==null) {
				return 0;
			}else {
				return -1;
			}
		}else {
			if(arg1==null) {
				return 1;
			}else {
				Integer seq1=arg0.getSeq();
				Integer seq2=arg1.getSeq();
				if(seq1==null) {
					if(seq2==null)return 0;
					else return -1;
				}else {
					if(seq2==null)return 1;
					else {
						return seq1.compareTo(seq2);
					}
				}
			}
		}
	}

}

